<script setup>
import {ref} from "vue";

const emit = defineEmits(['myEvent'])

defineProps({
  hintText: String,
  default: () => {
    return '公司/联系人/电话'
  }
})

const keyword = ref('')

function onSearch(val) {
  console.log(22);
  emit('myEvent', '---');
}
</script>

<template>
  <van-search
      v-model="keyword"
      show-action
      :placeholder="hintText"
      @search="onSearch"
  >
    <template #action>
      <div @click="onSearch">搜索</div>
    </template>
  </van-search>
</template>

<style scoped lang="less">

</style>